Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(grit): equivalence tests + minor fixes #3595

Merged
merged 1 commit into from
Aug 5, 2024

Conversation

arendjr
Copy link
Contributor

@arendjr arendjr commented Aug 5, 2024

Summary

Improves the Grit bindings to fix another edge case. Previously, $fn && fn() would match foo && foo(), but not foo.bar && foo.bar(). This fixes the parser so we don't "overfit" towards identifiers.

While debugging I ran into a fun issue, which is that there are two Unicode "mu" characters, uppercase µ (Unicode 181) and lowercase μ (Unicode 956). They're hardly distinguishable (and some monospace fonts don't seem to make any distinction), but 181 (upper case) is the correct one we should use. cc @ah-yu

With these fixes out of the way, I ran into another todo!() regarding equivalence tests, which have now been ported from Grit as well. And lo and behold, foo.bar && foo.bar() now matches too :)

Test Plan

Test added.

@arendjr arendjr changed the title Equivalence tests + minor fixes fix(grit): equivalence tests + minor fixes Aug 5, 2024
@github-actions github-actions bot added A-Parser Area: parser A-Formatter Area: formatter A-Tooling Area: internal tools L-JavaScript Language: JavaScript and super languages L-CSS Language: CSS labels Aug 5, 2024
Copy link

codspeed-hq bot commented Aug 5, 2024

CodSpeed Performance Report

Merging #3595 will improve performances by 7.19%

Comparing arendjr:grit-equivalence-tests (6128a6f) with main (817c901)

Summary

⚡ 1 improvements
✅ 103 untouched benchmarks

Benchmarks breakdown

Benchmark main arendjr:grit-equivalence-tests Change
pure_9395922602181450299.css[uncached] 4.8 ms 4.5 ms +7.19%

@arendjr arendjr merged commit f90e50c into biomejs:main Aug 5, 2024
14 checks passed
@Conaclos Conaclos added the A-Changelog Area: changelog label Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Changelog Area: changelog A-Formatter Area: formatter A-Parser Area: parser A-Tooling Area: internal tools L-CSS Language: CSS L-JavaScript Language: JavaScript and super languages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants